package org.university.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.university.entity.User;

import java.util.Optional;

/**
 * @Author ：3570023082@qq.com
 * @Date ：2025/9/13 12:26
 * @Description ：用户仓库接口
 */
public interface UserRepository extends JpaRepository<User, Long> {

    Optional<User> findByUserId(String userId);

    boolean existsByUserId(String userId);

    boolean existsByEmail(String email);

    User getByUserId(String userId);
}